﻿using App.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using YTCMS.Domain.Entities;

namespace App.Controllers
{
    public class BaseController: Controller
    {
        protected readonly log4net.ILog logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
        protected users current
        {
            get
            {
                return WZTContext.current;
            }
        }
        public BaseController()
        {
            if (current != null)
            {
                ViewBag.UserName = current.UserName;
            }
            else
            {
                ViewBag.UserType = null;
                ViewBag.UserName = "请登录";
            }


        }
	}
}